//
//  ByMyDocumentaryOrderView.m
//  caipiao_ios
//
//  Created by mc on 2018/8/23.
//  Copyright © 2018年 ZhangZhanbin. All rights reserved.
//

#import "ByMyDocumentaryOrderView.h"
#import "ByBetTitleValueView.h"


@implementation ByMyDocumentaryOrderView

- (id)init{
    self = [super init];
    if (self) {
    
    }
    return self;
}


- (void)setNetModel:(ByNetModel *)netModel{
    _netModel = netModel;
    CGFloat top = 10;
    for (int i = 0; i < 3; i++) {
        ByBetTitleValueView *valueView = [[ByBetTitleValueView alloc] init];
        [self addSubview:valueView];
        [valueView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(0);
            make.right.equalTo(self).offset(0);
            make.top.equalTo(self).offset(top + i * 25);
            make.height.mas_equalTo(@25);
        }];
        valueView.valueLabel.textColor = [UIColor lightGrayColor];
        if (i == 0) {
            valueView.titleLabel.text = @"订单编号:";
            valueView.valueLabel.text = netModel.sn;
            
        }else if (i == 1){
            
            valueView.titleLabel.text = @"下单时间:";
            valueView.valueLabel.text = [NSString stringWithFormat:@"%@",[NSDate getDateForStringFotmatWithTimeInterval:netModel.create_time.integerValue formatter:@"yyyy-MM-dd HH:mm"]];
        }
        else if (i == 2){
            valueView.titleLabel.text = @"怎么领奖:";
            valueView.valueLabel.text = @"如中奖，彩票直接返还至购彩账户";
        }
        
    }
}
@end
